package com.zhonglz;

import java.security.Security;
import java.util.Properties;

import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;

import com.github.pagehelper.PageHelper;


@SpringBootApplication
@MapperScan("com.zhonglz.mapper")
public class ApiShowSysApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
		SpringApplication.run(ApiShowSysApplication.class, args);
			
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ApiShowSysApplication.class);
    }
    
    @Bean
	public PageHelper pageHelper() {
		PageHelper pageHelper = new PageHelper();
		Properties pro = new Properties();
		pro.setProperty("offsetAsPageNum", "true");
		pro.setProperty("rowBoundsWithCount", "true");
		pro.setProperty("reasonable", "true");
		pageHelper.setProperties(pro);
		return pageHelper;
	}

}
